Make slightly more C++ friendly.
authorrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Mon, 27 Jan 2003 18:00:44 +0000 (18:00 +0000)
committerrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Mon, 27 Jan 2003 18:00:44 +0000 (18:00 +0000)
gpsbabel/queue.c
gpsbabel/queue.h
gpsbabel/route.c

index 1cb6e6efb4f94c2eb01d72aef5e65b6d8dcf7828..db3c56e6ef147cbd6e621667e727a77dff1eae0d 100644 (file)
 #include "queue.h"
 
 void
-enqueue(queue *new, queue *old)
+enqueue(queue *new_el, queue *old)
 {
-       new->next = old->next;
-       new->prev = old;
-       old->next->prev = new;
-       old->next = new;
+       new_el->next = old->next;
+       new_el->prev = old;
+       old->next->prev = new_el;
+       old->next = new_el;
 }
 
 queue *
index 84bce2a5620ab9d7f196566e46e7b529fdc8f807..b6b46bceb05063530e4e680a76e66271c951085c 100644 (file)
@@ -24,7 +24,7 @@ typedef struct queue {
        struct queue *prev;
 } queue;
 
-void enqueue(queue *new, queue *old);
+void enqueue(queue *new_el, queue *old);
 queue * dequeue(queue *element);
 
 #define QUEUE_INIT(head) (head)->next = (head)->prev = head
index 8a8ea03fc87c0d485056b1b93479fbceff786aa0..dac5c4909fdebabf72595e27d98d31b9abd7e0b8 100644 (file)
@@ -33,7 +33,7 @@ route_head *
 route_head_alloc(void)
 {
        route_head *rte_head;
-       rte_head = xcalloc(sizeof (*rte_head), 1);
+       rte_head = (route_head *) xcalloc(sizeof (*rte_head), 1);
        QUEUE_INIT(&rte_head->Q);
        return rte_head;
 }